package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SDingdanMapper;
import com.ruoyi.system.domain.SDingdan;
import com.ruoyi.system.service.ISDingdanService;
import com.ruoyi.common.core.text.Convert;

/**
 * 停车场订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-27
 */
@Service
public class SDingdanServiceImpl implements ISDingdanService 
{
    @Autowired
    private SDingdanMapper sDingdanMapper;

    /**
     * 查询停车场订单
     * 
     * @param id 停车场订单主键
     * @return 停车场订单
     */
    @Override
    public SDingdan selectSDingdanById(Long id)
    {
        return sDingdanMapper.selectSDingdanById(id);
    }

    /**
     * 查询停车场订单列表
     * 
     * @param sDingdan 停车场订单
     * @return 停车场订单
     */
    @Override
    public List<SDingdan> selectSDingdanList(SDingdan sDingdan)
    {
        return sDingdanMapper.selectSDingdanList(sDingdan);
    }

    /**
     * 新增停车场订单
     * 
     * @param sDingdan 停车场订单
     * @return 结果
     */
    @Override
    public int insertSDingdan(SDingdan sDingdan)
    {
        sDingdan.setCreateTime(DateUtils.getNowDate());
        return sDingdanMapper.insertSDingdan(sDingdan);
    }

    /**
     * 修改停车场订单
     * 
     * @param sDingdan 停车场订单
     * @return 结果
     */
    @Override
    public int updateSDingdan(SDingdan sDingdan)
    {
        return sDingdanMapper.updateSDingdan(sDingdan);
    }

    /**
     * 批量删除停车场订单
     * 
     * @param ids 需要删除的停车场订单主键
     * @return 结果
     */
    @Override
    public int deleteSDingdanByIds(String ids)
    {
        return sDingdanMapper.deleteSDingdanByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除停车场订单信息
     * 
     * @param id 停车场订单主键
     * @return 结果
     */
    @Override
    public int deleteSDingdanById(Long id)
    {
        return sDingdanMapper.deleteSDingdanById(id);
    }
}
